<?php
/**
 * Created by PhpStorm.
 * User: yuanjie
 * Date: 15/9/9
 * Time: 下午5:59
 */
class UserCheckCode extends Eloquent
{
    protected $table = "user_check_code";

    public static function getCheckCode($phone,$area){
        return UserCheckCode::where('phone',$phone)->where('area',$area)->first();
    }

    public static function delCheckCode($phone,$area){
        return UserCheckCode::where('phone',$phone)->where('area',$area)->delete();
    }

    public static function insCheckCode($data){
        return UserCheckCode::insert($data);
    }

}